package cn.ctodb.openapi.idcard.service.mapper;

import cn.ctodb.openapi.idcard.domain.*;
import cn.ctodb.openapi.idcard.service.dto.DataIdcardDTO;

import org.mapstruct.*;
import java.util.List;

/**
 * Mapper for the entity DataIdcard and its DTO DataIdcardDTO.
 */
@Mapper(componentModel = "spring", uses = {})
public interface DataIdcardMapper {

    DataIdcardDTO dataIdcardToDataIdcardDTO(DataIdcard dataIdcard);

    List<DataIdcardDTO> dataIdcardsToDataIdcardDTOs(List<DataIdcard> dataIdcards);

    DataIdcard dataIdcardDTOToDataIdcard(DataIdcardDTO dataIdcardDTO);

    List<DataIdcard> dataIdcardDTOsToDataIdcards(List<DataIdcardDTO> dataIdcardDTOs);
    /**
     * generating the fromId for all mappers if the databaseType is sql, as the class has relationship to it might need it, instead of
     * creating a new attribute to know if the entity has any relationship from some other entity
     *
     * @param id id of the entity
     * @return the entity instance
     */
     
    default DataIdcard dataIdcardFromId(Long id) {
        if (id == null) {
            return null;
        }
        DataIdcard dataIdcard = new DataIdcard();
        dataIdcard.setId(id);
        return dataIdcard;
    }
    

}
